package org.pwwong.fxscalautils.graphics

import java.awt._ 
import java.awt.geom._

object EmptyPathIterator { def apply() = new EmptyPathIterator }
class EmptyPathIterator extends PathIterator {
  override def currentSegment(coords:Array[Double]):Int = PathIterator.SEG_CLOSE
  override def currentSegment(coords:Array[Float]):Int = PathIterator.SEG_CLOSE
  override def getWindingRule():Int = PathIterator.SEG_CLOSE
  override def isDone():Boolean = true
  override def next(){}
}

object EmptyShape { def apply() = new EmptyShape }
class EmptyShape extends Shape {
  override def contains(x:Double, y:Double):Boolean = false
  override def contains(x:Double, y:Double, w:Double, h:Double):Boolean = false 	
  override def contains(p:Point2D):Boolean = false
  override def contains(r:Rectangle2D):Boolean = false
  override def getBounds():Rectangle = new Rectangle
  override def getBounds2D():Rectangle2D = new Rectangle
  override def getPathIterator(at:AffineTransform):PathIterator = new EmptyPathIterator 
  override def getPathIterator(at:AffineTransform , flatness:Double):PathIterator = new EmptyPathIterator 
  override def intersects(x:Double, y:Double, w:Double, h:Double):Boolean = false
  override def intersects(r:Rectangle2D):Boolean = false
}

object EmptyStroke { def apply() = new EmptyStroke }
class EmptyStroke extends Stroke {
  def createStrokedShape(p:Shape):Shape = new EmptyShape 
}
  
object ClearColor { def apply() =new Color(0,0,0,0) } 
